package com.sansi.pencilbook.service;

import com.sansi.pencilbook.DO.Result;
import com.sansi.pencilbook.entity.Category;

import java.util.List;

/**
 * 功能说明: 分类的服务接口
 *
 * @author lsy13
 */
public interface CategoryServer {

    //获得一级类别
    public Result getFirstCategory();

    //获得所有类别
    public Result getAllCategories();

    //获得某一父类的子类
    public Result getCategoriesByParent(int parentId);

    //获得某个类别
    public Result getCategoryByName(String name);

    //获得某个类别
    public Result getCategoryById(int id);

    //添加某个类别
    public Result addCategory(Category category);

    //更改某个分类
    public Result modifyCategory(Category category);

    //删除某个分类
    public Result deleteCategory(Category category);

    //批量删除类别
    public Result deleteCategories(List<Category> categories);
}
